package com.netspider.utils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Prop
{
	public static void init()
	{
		File propFile = new File(prop_file);
		try
		{
			prop = new Properties();
			FileReader fileReader = new FileReader(propFile);
			prop.load(fileReader);
		}
		catch (FileNotFoundException e)
		{
			Log.getLogger().warning("[Properties] the " + prop_file + " is not exist");
		}
		catch (IOException e)
		{
			Log.getLogger().warning("[Properties] load the  file " + prop_file + " failed");
		}
	}
	
	public static Properties getProp()
	{
		return prop;
	}
	private static Properties prop;
	private static final String prop_file = "./prop/default.prop";
}
